package com.deyang.web.controller.system;


import com.deyang.common.core.domain.AjaxResult;
import com.deyang.common.core.domain.entity.SysDept;
import com.deyang.common.core.domain.entity.SysRegion;
import com.deyang.system.service.ISysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 区域信息
 *
 * @author deyang
 */
@RestController
@RequestMapping("/system/region")
public class SysRegionController {


    @Autowired
    private ISysRegionService regionService;

    /**
     * 获取区域列表
     */
    @GetMapping("/list")
    public AjaxResult list(SysRegion region) {
        List<SysRegion> sysRegions = regionService.selectDeptList(region);
        return AjaxResult.success(sysRegions);
    }


}
